ALL_CC=$(wildcard *.cc)
SRC_CC+=$(filter-out test.cc, $(ALL_CC))  # 忽略掉指定文件
OBJS=$(patsubst %.cc, %.o, $(SRC_CC))

CC=g++ -std=c++11
CFLAGS=-g -w
ELF=server
LIBS=-lpthread

$(ELF):$(OBJS)
	$(CC) $(CFLAGS)  $^ -o $@ $(LIBS)
%.o:%.cc
	$(CC) $(CFLAGS) -c $< -o $@ $(LIBS)
clean:
	rm -rf $(ELF) $(OBJS)
